<template>
  <el-container style="height: 100vh;">
    <el-aside>
      <Menu />
    </el-aside>
    <el-container>
      <el-header>
        <headerBar />
      </el-header>
      <el-main>
        <transition name="slide-fade">
          <router-view></router-view>
        </transition>
      </el-main>
      <el-footer class="d-flex jc-center ai-center">
        <el-link href="https://gitee.com/zhangtianlu/AdministrationTemplates.git" target="_blank" type="info">技术部一哥</el-link>
      </el-footer>
    </el-container>
  </el-container>

</template>

<script>
import Menu from '@/views/layout/menu'
import headerBar from '@/views/layout/headerBar'
import { mapState } from 'vuex'


export default {
  data () {
    return {
      isCollapse: localStorage.getItem('isCollapse') ? eval(localStorage.getItem('isCollapse')) : false
    }
  },
  components: {
    Menu,
    headerBar
  },
  computed: {
    ...mapState(['sidebarMenu']),
  },

}
</script>

<style lang="scss" scoped>
::-webkit-scrollbar {
  display: none; /* Chrome Safari */
}
.slide-fade {
  position: absolute;
  left: 0;
  right: 0;
}
.slide-fade-enter-active {
  transition: all 1.2s ease;
}
.slide-fade-leave-active {
  transition: all 0.1s cubic-bezier(2, 0.5, 0.8, 1);
}
.slide-fade-enter,
.slide-fade-leave-to {
  left: 0;
  right: 0;
  transform: translateX(50px);
  opacity: 0;
}

.el-aside {
  width: auto !important;
}

.el-submenu .el-menu-item {
  min-width: 0;
}
.el-header {
  background-color: rgba(255, 255, 255, 0.8);
  padding-left: 0;
  height: 100px !important;
  overflow: hidden;
  .el-tabs__header {
    margin: 0;
  }
}
.el-footer {
  font-size: 12px;
  color: #999;
  // background-color: #f9f9f9;
}
.el-main {
  overflow-x: hidden;
  // background: #f5f5f5;
}
</style>
